package com.ow.dva.module.park.service.impl;

import com.ow.dva.module.base.entity.param.DvaPage;
import com.ow.dva.module.base.service.impl.DvaServiceImpl;
import com.ow.dva.module.park.entity.Park;
import com.ow.dva.module.park.mapper.ParkMapper;
import com.ow.dva.module.park.service.ParkService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 停车场表 服务实现类
 * </p>
 *
 * @author YanZengBao
 * @since 2020-02-19
 * @version V1.0
 */
@Service
public class ParkServiceImpl extends DvaServiceImpl<ParkMapper, Park> implements ParkService {

    @Override
    public DvaPage<Park> page(DvaPage<Park> page, Map<String, Object> param) {

        return baseMapper.page(page,param);
    }

    @Override
    public List<Park> list(Map<String, Object> param) {
        return baseMapper.list(param);
    }

    @Override
    public Long countByParkNumber(String number) {
        return baseMapper.countByParkNumber(number);
    }

    /**
     * 获取所有停车场（后期改为根据登录帐号获取）
     */
    @Override
    public List<Park> getParkList() {
        return baseMapper.getParkList();
    }

    @Override
    public Integer parkUpLoad(Park park) {
        return baseMapper.insert(park);
    }

    @Override
    public Integer deleteAll() {
        return baseMapper.deleteAll();
    }


}
